Query XML
Use the Query XML action A tool for building the processes, logic, and direction within workflows. to query specific information from an XML (Extensible Markup Language) content. You can use this action to read an XML file.
Before you begin:
-
Understand Variables
An XML file is an XML (Extensible Markup Language) data file that uses tags to define objects and object attributes. It is formatted much like an .HTML document, but uses custom tags to define objects and the data within each object. The XML format stores data in a structure that is machine-readable and human-readable.
You can add actions to create branches such as Branch by stage or to contain other actions such as Action Set that can be collapsed down into a single action high-level view.
Jump to:
Configure the Query XML action
-
Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.
- Specify the XML Source that contains the data you want to query.
- Type the XPath Query.
- Specify how you want to return the result.
- Click Save.
Query XML fields, buttons, and settings
Field or button |
Description |
Variable types |
---|---|---|
XML Source |
The XML content that you want to query. For example: Note: Although XML-reserved characters such as an ampersand ("&") or less-than sign ("<") are supported, the returned output is encoded. |
Text, Decimal, Integer, Boolean, DateTime, Collection |
XPath Query |
The XPath (XML Path Language) query used to retrieve nodes in an XML. The XPath query can resolve to a single node or a node list. If the result is a node list, the specified change will be applied to each node. For example, if you want to retrieve the inner XML of the XML Source " What is XPath and XPath query?
XPath or XML Path language is a query language that is used to query data from XML documents. An XPath query can be used for the purpose of content scanning of XML documents. Note: XPath has seven types of nodes: element, attribute, text, namespace, processing-instruction, comment, and document nodes. For more information about XPath or XML, see this W3Schools.com article. |
Text, Decimal, Integer, Boolean, DateTime, Collection |
Return result as |
Select one of the following to specify how you want the result to be returned.
For example, if the XML Source is
For example, if the XML Source is
For example, if the XML Source is Note:
|
(n/a) |
Store first result in | The variable used to store only the first result of the query results. | Text |
Store results in | The Collection or Dictionary variable used to store the query results. All values are returned. | Collection |